package myapps.ttclient.protocol.message.drawingscreen;

import java.io.DataOutputStream;
import java.io.IOException;

import myapps.ttclient.GlobalVariables;
import myapps.ttclient.baseclass_and_interface.TTClientMessage;

public class DSChangeColorMessage extends TTClientMessage {

	private int r;
	private int g;
	private int b;
	
	public DSChangeColorMessage(int r, int g, int b)
	{
		this.r = r;
		this.g = g;
		this.b = b;
	}
	
	@Override
	public void toDataOutputStream(DataOutputStream dos) throws IOException {
		dos.writeByte(DS_CHANGECOLOR);
		dos.writeInt(GlobalVariables.NO_LENGTH_CODE);
		
		dos.writeByte(this.r);
		dos.writeByte(this.g);
		dos.writeByte(this.b);
	}
}
